home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Tools & Apps / Graphics & Imaging / Ultra Dragging 1.0ß1 / UOffscreenManager.p < prev    next >
Encoding:
Text File  |  1991-04-02  |  2.5 KB  |  89 lines  |  [TEXT/MPS ]

  1. { UOffscreenManager.p}
  2. { Copyright © 1990, 1991 by Apple Computer, Inc. All rights reserved.}
  3.  
  4. {    Change List:
  5.  
  6.         ddmmyy
  7.     GAP 060990    Modified USES when changing from Lightspeed Pascal to MPW.
  8.     GAP 181290    Added comments.
  9.     GAP    250191    Removed superfluous comments.
  10.     GAP    250191    Added fDepthAndColorChecker to TOffscreenManager.
  11.     GAP    250191    Got rid of, now obslolete, TOffscreenManager.Update.
  12.     GAP    010491    Some reformatting and comments.
  13.  
  14.     End Change List. }
  15.  
  16. UNIT UOffscreenManager;
  17.  
  18. {    The UOffscreenManager unit provides capability for creating
  19.     and managing virtual offscreen pixmaps that may span
  20.     more than one graphics screen (GDevice).                        }
  21.  
  22.  
  23. INTERFACE
  24.  
  25.     USES
  26.  
  27.     {    Required for this unit's interface }
  28.  
  29.     {    MacApp }
  30.         UMacApp,
  31.  
  32.     {    Other Building Blocks }
  33.         UOSBitmap, UOSImage;
  34.  
  35.  
  36.     TYPE
  37.  
  38.     {    TOffscreenManager manages a list of TOffscreenDevices that represent an
  39.         area of the screen of fScreenRect size.  Each TOffscreenDevice as an
  40.         associated GDevice which has an appropriate depth for each monitor on
  41.         the user's system.                                                            }
  42.  
  43.         TOffscreenManager = OBJECT(TObject)
  44.  
  45.                 fDepthAndColorChecker : TEvtHandler;    { A cohandler that periodically adjusts depth and color.    }
  46.                 fDesktopPort : GrafPtr;                    { GrafPort encompassing all screens.                        }
  47.                 fScreenRect : Rect;                        { Area of screen stored offscreen.                            }
  48.                 fList : TList;                            { A list of TOffscreenDevices.                                }
  49.  
  50.                 PROCEDURE TOffscreenManager.IOffscreenManager (size: Point);
  51.                 
  52.                 PROCEDURE TOffscreenManager.Free;
  53.                 OVERRIDE;
  54.                 
  55.                 PROCEDURE TOffscreenManager.Fields (PROCEDURE DoToField (fieldName: Str255;
  56.                                                                          fieldAddr: Ptr;
  57.                                                                          fieldType: INTEGER));
  58.                 OVERRIDE;
  59.                 
  60.                 PROCEDURE TOffscreenManager.CheckDepthAndColor;
  61.                 
  62.                 PROCEDURE TOffscreenManager.Draw (PROCEDURE QuickDrawStuff);
  63.                 
  64.                 PROCEDURE TOffscreenManager.CopyBitsFrom (srcBits: BitMap;
  65.                                                           srcRect: Rect;
  66.                                                           offscreenRect: Rect;
  67.                                                           mode: INTEGER;
  68.                                                           maskRgn: RgnHandle);
  69.                 
  70.                 PROCEDURE TOffscreenManager.CopyBitsFromScreen (screenRect: Rect;
  71.                                                                 mode: INTEGER;
  72.                                                                 maskRgn: RgnHandle);
  73.                 
  74.                 PROCEDURE TOffscreenManager.CopyBitsTo (dstBits: BitMap;
  75.                                                         dstRect: Rect;
  76.                                                         offscreenRect: Rect;
  77.                                                         mode: INTEGER;
  78.                                                         maskRgn: RgnHandle);
  79.                 
  80.                 PROCEDURE TOffscreenManager.CopyBitsToScreen (mode: INTEGER; maskRgn: RgnHandle);
  81.  
  82.             END; {TOffscreenDevice}
  83.  
  84.  
  85. IMPLEMENTATION
  86.  
  87.     {$I $$Shell(SrcApp)UOffscreenManager.inc1.p}
  88.  
  89. END. {UOffscreenManager}